export const columns = ctx => {
  return [
    {
      width: 80,
      render: (h, row) => {
        return (
          <el-radio
            value={ctx.radio}
            onInput={(val) => { ctx.radio = val }}
            label={row.id}
            class="ml5"
            onChange={() => { ctx.handleChange(row) }}
          ><span class="dn"></span></el-radio>
        )
      }
    },
    {
      prop: 'name',
      label: '模板名称'
    },
    {
      label: '操作',
      render: (h, row) => {
        let edit = (
          <zm-button type="text" onClick={() => { ctx.onEdit(row) }}>编辑</zm-button>
        )
        let del = (
          <zm-button type="text" onClick={() => { ctx.onDel(row) }}>删除</zm-button>
        )
        return [edit, del]
      }
    }
  ]
}
